#rem
	Copyright (c) 2010 Peter J Rigby
	
	Permission is hereby granted, free of charge, to any person obtaining a copy
	of this software and associated documentation files (the "Software"), to deal
	in the Software without restriction, including without limitation the rights
	to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
	copies of the Software, and to permit persons to whom the Software is
	furnished to do so, subject to the following conditions:
	
	The above copyright notice and this permission notice shall be included in
	all copies or substantial portions of the Software.
	
	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
	IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
	FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
	AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
	LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
	OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
	THE SOFTWARE.

#END

Import mojo

Class tlShape
	
	Private
	
	Field image:Image
	Field width:Int
	Field height:Int
	Field url:String
	Field frames:Int
	Field smallindex:Int
	Field largeindex:Int
	Field maxradius:Float
	Field name:String
	
	Public
	
	Method Url:String() property
		Return url
	End
	
	Method Url(value:String) property
		url = value
	End
	
	Method Name:String() property
		Return name
	End
	
	Method Name(value:String) property
		name = value
	End
	
	Method Image:Image() property
		Return image
	End
	
	Method Image(value:Image) property
		image = value
	End
	
	Method Width:Int() property
		Return width
	End
	
	Method Width(value:Int) property
		width = value
	End
	
	Method Height:Int() property
		Return height
	End
	
	Method Height(value:Int) property
		height = value
	End
	
	Method MaxRadius:Float() property
		Return maxradius
	End
	
	Method MaxRadius(value:Float) property
		maxradius = value
	End
	
	Method LargeIndex:Int() property
		Return largeindex
	End
	
	Method LargeIndex(value:Int) property
		largeindex = value
	End
	
	Method Frames:Int() property
		Return frames
	End
	
	Method Frames(value:Int) property
		frames = value
	End

End

Function LoadShape:tlShape(url:String, width:Int, height:Int, frames:Int)
	Print url
	local shape:tlShape = New tlShape
	shape.Image = LoadImage(url, width, height, frames)
	shape.Width = width
	shape.Height = height
	shape.Frames = frames
	shape.Url = url
	
	Return shape

End